package no.monsen.client.common.logging;

import no.monsen.client.common.factory.MonsenLoggerFactory;

import org.apache.log4j.Logger;
/**
 * 
 * @author Marius Breivik
 * Created: 12.15.40 / 9. mars. 2008
 */
public class MonsenLogger extends Logger {

	//Dont want or need to instanciate the logger factory more than once...
	private static MonsenLoggerFactory myFactory = new MonsenLoggerFactory();

	public MonsenLogger(String logger) {
		super(logger);
	}

	/**
	 * We want to override the Looger's getLogger()-method to
	 * ensure that a MonsenLogger is returned
	 * @param The name of the class represented with a String that uses the looger
	 * @return A MonsenLogger is returned
	 */
	public static MonsenLogger getLogger( String name ) {
		return (MonsenLogger)Logger.getLogger(name, myFactory);
	}
}
